import request from '@/utils/request'

// 新增课时
export const addVideo = video => {
  return request({
    url: '/eduservice/video/addVideo',
    method: 'POST',
    data: video
  })
}

// 查询课时
export const getVideo = id => {
  return request({
    url: `/eduservice/video/getVideo/${id}`,
    method: 'GET'
  })
}

// 修改课时
export const updateVideo = video => {
  return request({
    url: '/eduservice/video/updateVideo',
    method: 'POST',
    data: video
  })
}

// 删除课时
export const deleteVideo = id => {
  return request({
    url: `/eduservice/video/deleteVideo/${id}`,
    method: 'DELETE'
  })
}
